package com.mxpio.erp.common.plm.entity;

import com.mxpio.erp.common.jpa.policy.ResCodeGeneratorPolicy;
import com.mxpioframework.filestorage.entity.MxpioFileInfo;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PLM_PROJECT_TASK_COMPLETE_DELIVERABLE_DRAFT")
@Schema(description="任务完工时-交付物草稿表")
public class ProjectTaskCompleteDeliverableDraft extends BaseEntity {

    private static final long serialVersionUID=1L;

    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "主键")
    private String id;

    @Column(name = "DOC_NO_")
    @Schema(description = "交付物编码编码")
    private String docNO;

    /**
     * 日志Id
     */
    @Column(name = "TASK_LOG_ID_")
    @Schema(description = "日志ID")
    private String taskLogId;

    @Column(name = "TASK_CODE_")
    @Schema(description = "任务编码")
    private String taskCode;

    @Column(name = "DOC_NAME_")
    @Schema(description = "交付物名称")
    private String docName;

    @Column(name = "DOC_FILE_",columnDefinition="TEXT")
    @Schema(description = "交付物")
    @Dict(dicCode = "fileNo", dicEntity = MxpioFileInfo.class, dicText = "fileName")
    private String docFile;

    @Column(name = "DOC_TYPE_")
    @Schema(description = "交付物类型")
    @Dict(dicCode = "ERP_PROJECT_DELIVERABLES_DOC_TYPE")
    private String docType;

    @Column(name = "DOC_TEMP_",columnDefinition="TEXT")
    @Schema(description = "文档模版")
    @Dict(dicCode = "fileNo", dicEntity = MxpioFileInfo.class, dicText = "fileName")
    private String docTemp;

    @Column(name = "NUMBER_")
    @Schema(description = "交付物顺序")
    private  Integer number;

    @Column(name = "IS_AUDIT_END_")
    @Schema(description = "是否审核结束")
    @Dict(dicCode = "MB_SYSTEM_YES_NO")//1:是；0:否
    private String isAuditEnd;
}
